package org.csu.onlineedubackend.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.csu.onlineedubackend.dto.*;
import org.csu.onlineedubackend.entity.Survey;
import org.csu.onlineedubackend.dto.PageResponseDTO;

import java.util.List;
import java.util.Map;

public interface SurveyService extends IService<Survey> {
    
    /**
     * 创建问卷
     */
    Integer createSurvey(CreateSurveyDTO createSurveyDTO);
    
    /**
     * 获取问卷详情
     */
    SurveyDTO getSurveyDetail(Integer surveyId);
    
    /**
     * 获取问卷列表（分页）
     */
    PageResponseDTO<SurveyDTO> getSurveyPage(int page, int size);
    
    /**
     * 删除问卷
     */
    boolean deleteSurvey(Integer surveyId);
    
    /**
     * 提交问卷答案
     */
    boolean submitSurveyAnswer(Integer surveyId, Integer userId, List<SurveyAnswerDTO> answers);
    
    /**
     * 获取问卷统计结果
     */
    Map<String, Object> getSurveyStatistics(Integer surveyId);
    
    /**
     * 获取用户可填写的问卷列表
     */
    List<SurveyDTO> getAvailableSurveys(Integer userId, Integer userRole);
} 